x=-0.5:0.05:0.5;y=x;I=100;
mu0=4*pi*1e-7;C0=mu0/(4*pi);
[X,Y]=meshgrid(x,y);
Bx=-2.*C0.*I.*Y./(X.^2+Y.^2).^(3./2)./(1./(X.^2+Y.^2)).^(1./2);
By=2.*C0.*I.*X./(X.^2+Y.^2).^(3./2)./(1./(X.^2+Y.^2)).^(1./2);
B=(4.*C0.^2.*I.^2.*Y.^2./(X.^2+Y.^2).^2+4.*C0.^2.*I.^2.*X.^2./(X.^2+Y.^2).^2).^(1./2);
%subplot(1,2,1);
quiver(X,Y,Bx,By,2);
axis([-0.5,0.5,-0.5,0.5]);
axis square;
%subplot(1,2,2);
%mesh(X,Y,B);